import { translateTitle } from '@/utils/i18n'
const TimerConfig = {
  TimerConfig: {
    search: {
      form: {
        method: 'dams.timer.query',
        name: 'search',
        field: [
          {
            type: 'input',
            name: 'TIMER_NAME',
            label: translateTitle('Dams.ApplicationInterface.定时器名称'),
            labelHidden: false,
          },
          {
            type: 'select',
            name: 'SUB_SYSTEM',
            label: translateTitle('Dams.ApplicationInterface.所属子系统'),
            options: [],
          },
          {
            type: 'button',
            label: translateTitle('Dams.ApplicationInterface.查询'),
            labelHidden: true,
          },
        ],
      },
    },
    dialog: {
      form: {
        method: '',
        name: 'dialog',
        field: [
          {
            type: 'checkbox',
            name: 'ID',
            label: '',
            hidden: true,
          },
          {
            type: 'input',
            name: 'TIMER_NAME',
            label: translateTitle('Dams.ApplicationInterface.定时器名称'),
            isRules: true,
            disabled_edit: true,
          },
          {
            type: 'vuicron',
            name: 'TIMER_EXEC_CYCLE',
            isRules: true,
            label: translateTitle('Dams.ApplicationInterface.执行周期表达式'),
          },
          {
            type: 'select',
            name: 'TIMER_IS_ENABLE',
            label: translateTitle('Dams.ApplicationInterface.是否开启'),
            isRules: true,
            options: [
              {
                LABEL: translateTitle('Dams.ApplicationInterface.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.ApplicationInterface.否'),
                CODE: 'N',
              },
            ],
          },
          {
            type: 'input',
            name: 'TIMER_CN_DESC',
            label: translateTitle('Dams.ApplicationInterface.中文描述'),
            isRules: true,
          },
          {
            type: 'input',
            name: 'LAST_RUN_TIME',
            label: translateTitle('Dams.ApplicationInterface.上次执行时间'),
            hidden: true,
          },
          {
            type: 'select',
            name: 'TIMER_GROUP',
            isRules: true,
            label: translateTitle('Dams.ApplicationInterface.定时任务分组'),
            filterable: true,
            options: [],
          },
          {
            type: 'input',
            name: 'TIMER_EN_DESC',
            isRules: true,
            label: translateTitle('Dams.ApplicationInterface.英文描述'),
          },
          {
            type: 'select',
            name: 'SUB_SYSTEM',
            label: translateTitle('Dams.ApplicationInterface.所属子系统'),
            isRules: true,
            options: [],
          },
          {
            type: 'input',
            name: 'LOG_SAVE_TIME',
            isRules: true,
            label: `${translateTitle('Dams.ApplicationInterface.日志存储时间')}(${translateTitle('Dams.ApplicationInterface.单位')}:${translateTitle(
              'Dams.ApplicationInterface.小时'
            )})`,
          },
          {
            type: 'input',
            name: 'TIMER_BEAN_NAME',
            isRules: true,
            label: translateTitle('Dams.ApplicationInterface.任务执行BEAN'),
            value: 'defaultDoSpTimerJob',
          },
          {
            type: 'input',
            name: 'API_NAME',
            label: translateTitle('Dams.ApplicationInterface.接口名称'),
          },
          {
            type: 'input',
            name: 'DB_ID',
            label: translateTitle('Dams.ApplicationInterface.数据源ID'),
          },
          {
            type: 'input',
            name: 'SP_NAME',
            label: translateTitle('Dams.ApplicationInterface.SP名称'),
          },
          {
            type: 'textarea',
            name: 'SP_PARAMS',
            label: translateTitle('Dams.ApplicationInterface.SP参数'),
          },
          {
            type: 'select',
            name: 'SERIAL_EXEC',
            label: translateTitle('Dams.ApplicationInterface.是否串行'),
            isRules: true,
            options: [
              {
                LABEL: translateTitle('Dams.ApplicationInterface.是'),
                CODE: 'Y',
              },
              {
                LABEL: translateTitle('Dams.ApplicationInterface.否'),
                CODE: 'N',
              },
            ],
          },
          {
            type: 'input',
            name: 'LOCK_EXPIRE_TIME',
            label: `${translateTitle('Dams.ApplicationInterface.锁超时时间')}(${translateTitle('Dams.ApplicationInterface.单位')}:${translateTitle(
              'Dams.ApplicationInterface.秒'
            )})`,
            isRules: true,
          },
          {
            type: 'input',
            name: 'UDF01',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}1`,
          },
          {
            type: 'input',
            name: 'UDF02',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}2`,
          },
          {
            type: 'input',
            name: 'UDF03',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}3`,
          },
          {
            type: 'input',
            name: 'UDF04',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}4`,
          },
          {
            type: 'input',
            name: 'UDF05',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}5`,
          },

          {
            type: 'input',
            name: 'UDF06',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}6`,
          },
          {
            type: 'input',
            name: 'UDF07',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}7`,
          },
          {
            type: 'input',
            name: 'UDF08',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}8`,
          },

          {
            type: 'input',
            name: 'UDF09',
            label: `${translateTitle('Dams.ApplicationInterface.自定义')}9`,
          },
          {
            type: 'input',
            name: 'TIMER_HOST',
            hidden: true,
            label: translateTitle('Dams.ApplicationInterface.定时任务主机配置'),
          },
          {
            type: 'button',
            label: translateTitle('Dams.ApplicationInterface.提交'),
            labelHidden: true,
          },
        ],
      },
    },
    deleteMethod: 'dams.timer.del',
    updateMethod: 'dams.timer.edit',
    addMethod: 'dams.timer.add',
  },
}
export default TimerConfig
